<template>
	<view class="bg">
		<view class="title" :style="'padding-top:' + titleHeight + 'px'">
			<image :src="logo" mode="widthFix"></image>
		</view>
	</view>
</template>
<script>
	let menuButtonInfo = uni.getMenuButtonBoundingClientRect()
	console.log(menuButtonInfo)
	// console.log("胶囊top值：" + menuButtonInfo.top)
	import {
		apiBaseUrl
	} from '@/config/config.js'
	export default {
		data() {
			return {
				titleHeight:menuButtonInfo.top+5,
				apiBaseUrl,
				logo: ''
			}
		},
		created() {
			
				
				this.$api.site_data({
					siteCode: 'main'
				}, res => {
					if (res.code == 200) {
						this.logo = res.data.logo
					}
				})
			
		},
		methods: {

		}
	}
</script>

<style lang="scss">
	.bg {
		position: fixed;
		z-index: 9;
		padding-bottom: 20rpx;

		.title {
			display: flex;
			align-items: center;
			margin-left: 10rpx;

			image {
				width: 200rpx;
			}

			.top-title {

				font-weight: bold;
				color: #333;
				font-size: 50rpx;
				margin-right: 20rpx;

			}

			input {
				border: 1px solid #bfbfbf;
				border-radius: 50px;
				padding: 5rpx 20rpx;
				color: #333;
				font-size: 25rpx;
				width: 20%;
			}
		}
	}
</style>